﻿using Microsoft.Extensions.DependencyInjection;
using Stee.CAP8.MessageBus.Message;
using System;
using test.kafka.usercode;

namespace test.kafka.Payment
{
    class Program
    {
        static void Main(string[] args)
        {
            var services = new ServiceCollection();
            services
                .AddEventBus()
                .AddRebusHandler<PaymentHandler>()
                .UseEventBus(bus =>
                {
                    bus.AddSubscrbe<PaymentStartedEvent>(services);
                    bus.AddSubscrbe<OrderCreatedEvent>(services);
                });
            Console.Read();
        }
    }
}
